package com.party.core.model.audio;

import com.party.core.model.BaseModel;

/**
 * @program: party
 * @description: 音频实体
 * @author: Hua Qunhao
 * @create: 2019-03-11 14:42
 **/
public class Audio extends BaseModel {

    private String audioTitle;
    private Integer audioType;
    private String audioUrl;

    public Audio() {
    }

    public Audio(String audioTitle, Integer audioType, String audioUrl) {
        this.audioTitle = audioTitle;
        this.audioType = audioType;
        this.audioUrl = audioUrl;
    }

    public String getAudioTitle() {
        return audioTitle;
    }

    public void setAudioTitle(String audioTitle) {
        this.audioTitle = audioTitle;
    }

    public Integer getAudioType() {
        return audioType;
    }

    public void setAudioType(Integer audioType) {
        this.audioType = audioType;
    }

    public String getAudioUrl() {
        return audioUrl;
    }

    public void setAudioUrl(String audioUrl) {
        this.audioUrl = audioUrl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Audio)) return false;
        if (!super.equals(o)) return false;

        Audio audio = (Audio) o;

        if (audioTitle != null ? !audioTitle.equals(audio.audioTitle) : audio.audioTitle != null) return false;
        if (audioType != null ? !audioType.equals(audio.audioType) : audio.audioType != null) return false;
        return audioUrl != null ? audioUrl.equals(audio.audioUrl) : audio.audioUrl == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (audioTitle != null ? audioTitle.hashCode() : 0);
        result = 31 * result + (audioType != null ? audioType.hashCode() : 0);
        result = 31 * result + (audioUrl != null ? audioUrl.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Audio{" +
                "audioTitle='" + audioTitle + '\'' +
                ", audioType=" + audioType +
                ", audioUrl='" + audioUrl + '\'' +
                '}';
    }
}
